From 2c8aa2480ea41cb52e6063613ab435193fc727e5 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 9 Jun 2013 23:16:41 +0000 Subject: [PATCH] garmin_gpi: Seek to image offset in case there's additional headers in the bmp, such as those inserted by gimp, etc. Fix warning when compiling with debug. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4391 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/garmin_gpi.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/garmin_gpi.cc b/gpsbabel/garmin_gpi.cc index 11a6cd37b..c2304236f 100644 --- a/gpsbabel/garmin_gpi.cc +++ b/gpsbabel/garmin_gpi.cc @@ -1368,6 +1368,8 @@ load_bitmap_from_file(const char* fname, unsigned char** data, int* data_sz) ptr = (unsigned char*)dest_h; ptr += (sizeof(*dest_h) + (dest_line_sz * (src_h.height - 1))); + gbfseek(f, src_h.image_offset, SEEK_SET); + if (src_h.bpp == 24) { /* 24 bpp seems to be not supported, convert to 32 bpp */ for (i = 0; i < src_h.height; i++) { -- 2.30.2